
package com.idealighter.game.chat.handler;

import com.google.inject.Inject;

import com.idealighter.game.chat.manager.ChatMgr;
import com.idealighter.game.chat.message.ReqTableChatMsg;
import com.idealighter.game.core.annotation.ReqMsgHandler;
import com.idealighter.game.message.ModuleMsgIdConstant;
import com.idealighter.game.message.core.ReqMessage;
import com.idealighter.game.message.core.ResMessage;
import com.idealighter.game.player.struct.Player;
import com.idealighter.game.server.handler.ReqMessageHandler;


@ReqMsgHandler(ModuleMsgIdConstant.Chat.TABLE_CHAT)
public class ReqTableChatHandler implements ReqMessageHandler {

  @Inject
  private ChatMgr chatMgr;

  @Override
  public ResMessage action(Player player, ReqMessage message) {
    ReqTableChatMsg msg = (ReqTableChatMsg) message;
    chatMgr.tableChat(player, msg.getContent());

    return null;
  }
}
